package com.yixuan.mt.common.service;

import com.yixuan.mt.common.entity.Objects;
import com.yixuan.mt.common.request.UploadRequest;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

public interface ObjectsService {

    void postObjects(String objectPath, File file);

    void upload(UploadRequest uploadRequest) throws IOException;

    void postFolder(String folderPath);

    void deleteObjects(String name, List<Integer> ids);

    List<Objects> getObjects(Integer lastId, String parentPath) throws IOException;

    ResponseEntity<InputStreamResource> download(String objectPath) throws FileNotFoundException;

    Boolean isParentPathExist(String parentPath);
}
